import request from '@/utils/request';

const processInstanceApi = {};

processInstanceApi.historyPage = (params) => {
	return request({
		url: '/activiti-api/process-instance/history-page',
		method: 'get',
		params: params,
	})
}
processInstanceApi.page = (params) => {
	return request({
		url: '/activiti-api/process-instance/page',
		method: 'get',
		params: params,
	})
}
processInstanceApi.start = (params) => {
	return request({
		url: '/activiti-api/process-instance/start',
		method: 'post',
    data: params
	})
}
processInstanceApi.nextTasks = (processInstanceId) => {
	return request({
		url: '/activiti-api/process-instance/next-tasks/' + processInstanceId,
		method: 'get',
	})
}

export default processInstanceApi